package com.techstar.ats.codec.history.decoder;

import io.netty.buffer.ByteBuf;
import com.techstar.ats.codec.Decoder;
import com.techstar.ats.codec.StringCodec;
import com.techstar.ats.dxp.history.F13GroupRunning;

public enum F13GroupRunningDecoder implements Decoder<F13GroupRunning> {
	INSTANCE;

	public F13GroupRunning create() {
		return new F13GroupRunning();
	}

	public void decode(ByteBuf buf, F13GroupRunning value) {
		value.group = (new StringCodec(9)).get(buf);
		value.totalRunning = buf.readUnsignedInt();
		value.monthRepair = buf.readUnsignedInt();
		value.shelfRepair = buf.readUnsignedInt();
		value.periodRepair = buf.readUnsignedInt();
		value.factoryRepair = buf.readUnsignedInt();
	}
}
